Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active May 12, 2024 02:46
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@michael-pratt
michael-pratt / RequestAndResponseLoggingFilter.java
Last active May 12, 2024 02:45
Simple Spring Boot Request and Response Logging Filter
// Adapted from https://gist.github.com/int128/e47217bebdb4c402b2ffa7cc199307ba
package com.elvtn.logging;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.jmx.export.annotation.ManagedOperation;
import org.springframework.jmx.export.annotation.ManagedResource;
@zhuziyi1989
zhuziyi1989 / URL Schemes.md
Last active May 12, 2024 02:45
常用 URL Schemes 收集。

** 由于此文年事已久,可能某些URL Schemes已失效,可在评论区留言指出!(最后更新于 2024.4.16)

关于 URL Scheme 你知道多少?

iOS系统中

由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在APP之间跳转的方法:URL Scheme。简单的说,URL Scheme就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的URL Scheme都是不一样的,如果存在一样的URL Scheme,那么系统就会响应先安装那个 APP 的URL Scheme,因为后安装的 APP 的URL Scheme被覆盖掉了,是不能被调用的。

Android系统中

@siph
siph / building_a_standalone_nixvim.md
Created September 10, 2023 23:51
Building a standalone nixvim configuration

Building a standalone nixvim configuration

A standalone configuration is one that exists in its own project/repository. This means that you can externalize your entire neovim configuration, including flake inputs, nixpkgs version, etc...

This decoupling of neovim and NixOS configurations has multiple advantages including mixing stable/unstable nixpkgs and the ability to run your neovim configuration outside of your NixOS configuration. You can even run it outside of NixOS all together.

@NoraCodes
NoraCodes / raserver-cipher.py
Last active May 12, 2024 02:41
Asynchronous Reverse Shell and Server in Python using asyncio
#!/usr/bin/env python3
"""
An async server for base64-encoded reverse shells
Allows rashell-cipher clients to connect and get commands
Expects network data in base64 wrapping xor enciphered data
The XOR key in this script needs to match the client key.
Written by Leo Tindall / SilverWingedSeraph
This code is covered by a CC-BY-SA 4.0 license.
Give attribution and share under the same license.
@tiffany352
tiffany352 / SynthWave 84.json
Created September 6, 2020 19:58
I ported the SynthWave 84 color scheme to work in the Windows Terminal
{
"name": "SynthWave 84",
"background": "#262335",
"foreground": "#ffffff",
"white": "#ffffff",
"brightWhite": "#ffffff",
"black": "#000000",
"brightBlack": "#888888",
"blue": "#03edf9",
"brightBlue": "#03edf9",
@greymd
greymd / sudo新一.md
Last active May 12, 2024 02:31
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:& };: でプロセステーブ

@leocomelli
leocomelli / git.md
Last active May 12, 2024 02:31
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@sudkumar
sudkumar / channels.tsx
Last active May 12, 2024 02:25
Web-Sockets in ReactJS with PusherJs and Laravel Echo with public and private channels
import React, { useEffect, useState, useMemo } from "react"
import Echo from "laravel-echo"
import Pusher from "pusher-js"
/**
* Pusher configuration
*/
const pusherConfig = {
key: '<your_pusher_key_here>',
cluster: '<pusher_cluster>',